<template>
  <div>
    <el-row>
      <el-col>
        <div id="pieid" :style="{width: '100%', height: '400px'}"></div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        msg: ''
      }
    },
    mounted() {
      this.drawLine();
    },
    methods: {
      drawLine() {
        // 基于准备好的dom，初始化echarts实例
        let pieid = this.$echarts.init(document.getElementById('pieid'));
        // 绘制图表
        pieid.setOption(
          {
            tooltip: {
              trigger: 'item'
            },
            textStyle:{
              color:'#fff',
            },
            xAxis: {
              type: 'category',
              data: ['2017-09', '2017-10', '2017-11', '2017-12', '2018-01', '2018-02', '2018-03', '2018-04', '2018-05', '2018-06', '2018-07', '2018-08']
            },
            yAxis: {
              min: 30,
              type: 'value',
              axisLabel: {
                formatter: '{value} K'
              },
            },
            series: [{
              data: [43, 45, 55, 51, 48, 33, 50, 57, 53, 50, 62, 52],
              type: 'line',
              smooth: true,
              itemStyle: {
                normal: {
                  color: "#57bdda"
                },
              },
            }]
          }
        );
      }
    }
  }
</script>

<style scoped>

</style>
